using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_AdZoneTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_AdZoneTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_AdZoneTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_AdZone";
			dataTableMapping.ColumnMappings.Add("ZoneID", "ZoneID");
			dataTableMapping.ColumnMappings.Add("ChannelID", "ChannelID");
			dataTableMapping.ColumnMappings.Add("IncludeADID", "IncludeADID");
			dataTableMapping.ColumnMappings.Add("ZoneName", "ZoneName");
			dataTableMapping.ColumnMappings.Add("ZoneJSName", "ZoneJSName");
			dataTableMapping.ColumnMappings.Add("ZoneIntro", "ZoneIntro");
			dataTableMapping.ColumnMappings.Add("ZoneType", "ZoneType");
			dataTableMapping.ColumnMappings.Add("DefaultSetting", "DefaultSetting");
			dataTableMapping.ColumnMappings.Add("ZoneSetting", "ZoneSetting");
			dataTableMapping.ColumnMappings.Add("ZoneWidth", "ZoneWidth");
			dataTableMapping.ColumnMappings.Add("ZoneHeight", "ZoneHeight");
			dataTableMapping.ColumnMappings.Add("Active", "Active");
			dataTableMapping.ColumnMappings.Add("ShowType", "ShowType");
			dataTableMapping.ColumnMappings.Add("UpdateTime", "UpdateTime");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_AdZone] WHERE (([ZoneID] = @Original_ZoneID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ZoneID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_AdZone] ([ZoneID], [ChannelID], [IncludeADID], [ZoneName], [ZoneJSName], [ZoneIntro], [ZoneType], [DefaultSetting], [ZoneSetting], [ZoneWidth], [ZoneHeight], [Active], [ShowType], [UpdateTime]) VALUES (@ZoneID, @ChannelID, @IncludeADID, @ZoneName, @ZoneJSName, @ZoneIntro, @ZoneType, @DefaultSetting, @ZoneSetting, @ZoneWidth, @ZoneHeight, @Active, @ShowType, @UpdateTime)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IncludeADID", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "IncludeADID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneJSName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneJSName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneIntro", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DefaultSetting", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "DefaultSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneSetting", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "ZoneSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneWidth", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneWidth", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ZoneHeight", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneHeight", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Active", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ShowType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ShowType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.SmallDateTime, 0, ParameterDirection.Input, 0, 0, "UpdateTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_AdZone] SET [ZoneID] = @ZoneID, [ChannelID] = @ChannelID, [IncludeADID] = @IncludeADID, [ZoneName] = @ZoneName, [ZoneJSName] = @ZoneJSName, [ZoneIntro] = @ZoneIntro, [ZoneType] = @ZoneType, [DefaultSetting] = @DefaultSetting, [ZoneSetting] = @ZoneSetting, [ZoneWidth] = @ZoneWidth, [ZoneHeight] = @ZoneHeight, [Active] = @Active, [ShowType] = @ShowType, [UpdateTime] = @UpdateTime WHERE (([ZoneID] = @Original_ZoneID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IncludeADID", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "IncludeADID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneJSName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneJSName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneIntro", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ZoneIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DefaultSetting", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "DefaultSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneSetting", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "ZoneSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneWidth", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneWidth", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ZoneHeight", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneHeight", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Active", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ShowType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ShowType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.SmallDateTime, 0, ParameterDirection.Input, 0, 0, "UpdateTime", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ZoneID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[12];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT ZoneID, ChannelID, IncludeADID, ZoneName, ZoneJSName, ZoneIntro, ZoneType, \r\n      DefaultSetting, ZoneSetting, ZoneWidth, ZoneHeight, Active, ShowType, \r\n      UpdateTime\r\nFROM HL_AdZone";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "--update HL_Advertisement set zoneID=0 where zondid=@zoneid\r\nDELETE FROM HL_AdZone where ZoneID=@ZoneID\r\n";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ZoneID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "DELETE FROM HL_AdZone\r\nWHERE (ZoneID IN\r\n          (SELECT a\r\n         FROM fn_split(@ZoneidArr, ',') AS fn_split_1))";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@ZoneidArr", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT Active, ChannelID, DefaultSetting, IncludeADID, ShowType, UpdateTime, ZoneHeight, ZoneID, ZoneIntro, ZoneJSName, ZoneName, ZoneSetting, ZoneType, ZoneWidth FROM HL_AdZone WHERE (ZoneID = @ZoneID)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@ZoneID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT ZoneID, ChannelID, IncludeADID, ZoneName, ZoneJSName, ZoneIntro, ZoneType, \r\n      DefaultSetting, ZoneSetting, ZoneWidth, ZoneHeight, Active, ShowType, \r\n      UpdateTime\r\nFROM HL_AdZone where  (Active = 1)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "Pr_GetAdZoneByNameIntro";
			this._commandCollection[5].CommandType = CommandType.StoredProcedure;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@ZoneName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@Zonetype", SqlDbType.Int, 32, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "SELECT  *\r\nFROM HL_AdZone\r\nWHERE (ChannelID = @ChannelID) AND (Active = 1)";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "pr_inserzdzone";
			this._commandCollection[7].CommandType = CommandType.StoredProcedure;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneJSName", SqlDbType.VarChar, 500, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneIntro", SqlDbType.VarChar, 1000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@DefaultSetting", SqlDbType.Bit, 1, ParameterDirection.Input, 1, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneSetting", SqlDbType.VarChar, 500, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneWidth", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ZoneHeight", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit, 1, ParameterDirection.Input, 1, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ShowType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "UPDATE [HL_AdZone] SET [ChannelID] = @ChannelID  WHERE ZoneID in (Select *  From fn_Split(@ZoneidArr,','))";
			this._commandCollection[8].CommandType = CommandType.Text;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ZoneidArr", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = " \r\nUPDATE [HL_AdZone] SET Active = 1  WHERE ZoneID in (Select *  From fn_Split(@ZoneidArr,','))";
			this._commandCollection[9].CommandType = CommandType.Text;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@ZoneidArr", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[10] = new SqlCommand();
			this._commandCollection[10].Connection = this.Connection;
			this._commandCollection[10].CommandText = " \r\nUPDATE [HL_AdZone] SET Active = 0  WHERE ZoneID in (Select *  From fn_Split(@ZoneidArr,','))";
			this._commandCollection[10].CommandType = CommandType.Text;
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ZoneidArr", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[11] = new SqlCommand();
			this._commandCollection[11].Connection = this.Connection;
			this._commandCollection[11].CommandText = "UPDATE HL_AdZone\r\nSET ChannelID =@ChannelID, ZoneName =@ZoneName, ZoneJSName =@ZoneJSName, ZoneIntro =@ZoneIntro, ZoneType =@ZoneType, DefaultSetting =@DefaultSetting, \r\n      ZoneSetting =@ZoneSetting, ZoneWidth =@ZoneWidth, ZoneHeight =@ZoneHeight, Active =@Active , ShowType =@ShowType, UpdateTime =@UpdateTime WHERE ZoneID=@ZoneID";
			this._commandCollection[11].CommandType = CommandType.Text;
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneName", SqlDbType.NVarChar, 100, ParameterDirection.Input, 0, 0, "ZoneName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneJSName", SqlDbType.NVarChar, 100, ParameterDirection.Input, 0, 0, "ZoneJSName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneIntro", SqlDbType.NVarChar, 255, ParameterDirection.Input, 0, 0, "ZoneIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@DefaultSetting", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "DefaultSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneSetting", SqlDbType.NText, 1073741823, ParameterDirection.Input, 0, 0, "ZoneSetting", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneWidth", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneWidth", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneHeight", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneHeight", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "Active", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ShowType", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ShowType", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@UpdateTime", SqlDbType.SmallDateTime, 4, ParameterDirection.Input, 0, 0, "UpdateTime", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11].Parameters.Add(new SqlParameter("@ZoneID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ZoneID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetAllAdZone()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Fill, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int FillBy(S_AdZone.HL_AdZoneDataTable dataTable, int ZoneID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = ZoneID;
			if (this.ClearBeforeFill)
			{
				dataTable.Clear();
			}
			return this.Adapter.Fill(dataTable);
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetSingeAdZone(int ZoneID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			this.Adapter.SelectCommand.Parameters[0].Value = ZoneID;
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetAllActiveAdZone()
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetAdZoneByNameIntro(string ZoneName, int? Zonetype)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (ZoneName == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = ZoneName;
			}
			if (!Zonetype.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = Zonetype.Value;
			}
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetJsNameByChannelID(int? ChannelID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			if (ChannelID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_AdZone.HL_AdZoneDataTable GetZoneID(int? ChannelID, string ZoneName, string ZoneJSName, string ZoneIntro, int? ZoneType, bool? DefaultSetting, string ZoneSetting, int? ZoneWidth, int? ZoneHeight, bool? Active, int? ShowType, System.DateTime? UpdateTime)
		{
			this.Adapter.SelectCommand = this.CommandCollection[7];
			if (ChannelID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ZoneName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = ZoneName;
			}
			if (ZoneJSName == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = ZoneJSName;
			}
			if (ZoneIntro == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = ZoneIntro;
			}
			if (ZoneType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = ZoneType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (DefaultSetting.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = DefaultSetting.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (ZoneSetting == null)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = ZoneSetting;
			}
			if (ZoneWidth.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[8].Value = ZoneWidth.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (ZoneHeight.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[9].Value = ZoneHeight.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (Active.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[10].Value = Active.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (ShowType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[11].Value = ShowType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[11].Value = System.DBNull.Value;
			}
			if (UpdateTime.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[12].Value = UpdateTime.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[12].Value = System.DBNull.Value;
			}
			S_AdZone.HL_AdZoneDataTable hL_AdZoneDataTable = new S_AdZone.HL_AdZoneDataTable();
			this.Adapter.Fill(hL_AdZoneDataTable);
			return hL_AdZoneDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_AdZone.HL_AdZoneDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_AdZone dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_AdZone");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_ZoneID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_ZoneID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(int ZoneID, int? ChannelID, string IncludeADID, string ZoneName, string ZoneJSName, string ZoneIntro, int? ZoneType, bool DefaultSetting, string ZoneSetting, int? ZoneWidth, int? ZoneHeight, bool Active, int? ShowType, System.DateTime UpdateTime)
		{
			this.Adapter.InsertCommand.Parameters[0].Value = ZoneID;
			if (ChannelID.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (IncludeADID == null)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = IncludeADID;
			}
			if (ZoneName == null)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = ZoneName;
			}
			if (ZoneJSName == null)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = ZoneJSName;
			}
			if (ZoneIntro == null)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = ZoneIntro;
			}
			if (ZoneType.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = ZoneType.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			this.Adapter.InsertCommand.Parameters[7].Value = DefaultSetting;
			if (ZoneSetting == null)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = ZoneSetting;
			}
			if (ZoneWidth.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = ZoneWidth.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (ZoneHeight.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[10].Value = ZoneHeight.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
			}
			this.Adapter.InsertCommand.Parameters[11].Value = Active;
			if (ShowType.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[12].Value = ShowType.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[12].Value = System.DBNull.Value;
			}
			this.Adapter.InsertCommand.Parameters[13].Value = UpdateTime;
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(int ZoneID, int? ChannelID, string IncludeADID, string ZoneName, string ZoneJSName, string ZoneIntro, int? ZoneType, bool DefaultSetting, string ZoneSetting, int? ZoneWidth, int? ZoneHeight, bool Active, int? ShowType, System.DateTime UpdateTime, int Original_ZoneID)
		{
			this.Adapter.UpdateCommand.Parameters[0].Value = ZoneID;
			if (ChannelID.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = ChannelID.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (IncludeADID == null)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = IncludeADID;
			}
			if (ZoneName == null)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = ZoneName;
			}
			if (ZoneJSName == null)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = ZoneJSName;
			}
			if (ZoneIntro == null)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = ZoneIntro;
			}
			if (ZoneType.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = ZoneType.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[7].Value = DefaultSetting;
			if (ZoneSetting == null)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = ZoneSetting;
			}
			if (ZoneWidth.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = ZoneWidth.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (ZoneHeight.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = ZoneHeight.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[11].Value = Active;
			if (ShowType.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[12].Value = ShowType.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[13].Value = UpdateTime;
			this.Adapter.UpdateCommand.Parameters[14].Value = Original_ZoneID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteAdZone(int ZoneID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = ZoneID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteAdZones(string ZoneidArr)
		{
			SqlCommand sqlCommand = this.CommandCollection[2];
			if (ZoneidArr == null)
			{
				throw new System.ArgumentNullException("ZoneidArr");
			}
			sqlCommand.Parameters[0].Value = ZoneidArr;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int MoveAdZoneChannel(int? ChannelID, string ZoneidArr)
		{
			SqlCommand sqlCommand = this.CommandCollection[8];
			if (ChannelID.HasValue)
			{
				sqlCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (ZoneidArr == null)
			{
				throw new System.ArgumentNullException("ZoneidArr");
			}
			sqlCommand.Parameters[1].Value = ZoneidArr;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetAdZoneActive(string ZoneidArr)
		{
			SqlCommand sqlCommand = this.CommandCollection[9];
			if (ZoneidArr == null)
			{
				throw new System.ArgumentNullException("ZoneidArr");
			}
			sqlCommand.Parameters[0].Value = ZoneidArr;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetAdZoneUnActive(string ZoneidArr)
		{
			SqlCommand sqlCommand = this.CommandCollection[10];
			if (ZoneidArr == null)
			{
				throw new System.ArgumentNullException("ZoneidArr");
			}
			sqlCommand.Parameters[0].Value = ZoneidArr;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateZone(int? ChannelID, string ZoneName, string ZoneJSName, string ZoneIntro, int? ZoneType, bool DefaultSetting, string ZoneSetting, int? ZoneWidth, int? ZoneHeight, bool Active, int? ShowType, System.DateTime UpdateTime, int ZoneID)
		{
			SqlCommand sqlCommand = this.CommandCollection[11];
			if (ChannelID.HasValue)
			{
				sqlCommand.Parameters[0].Value = ChannelID.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (ZoneName == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = ZoneName;
			}
			if (ZoneJSName == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = ZoneJSName;
			}
			if (ZoneIntro == null)
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = ZoneIntro;
			}
			if (ZoneType.HasValue)
			{
				sqlCommand.Parameters[4].Value = ZoneType.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			sqlCommand.Parameters[5].Value = DefaultSetting;
			if (ZoneSetting == null)
			{
				sqlCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[6].Value = ZoneSetting;
			}
			if (ZoneWidth.HasValue)
			{
				sqlCommand.Parameters[7].Value = ZoneWidth.Value;
			}
			else
			{
				sqlCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (ZoneHeight.HasValue)
			{
				sqlCommand.Parameters[8].Value = ZoneHeight.Value;
			}
			else
			{
				sqlCommand.Parameters[8].Value = System.DBNull.Value;
			}
			sqlCommand.Parameters[9].Value = Active;
			if (ShowType.HasValue)
			{
				sqlCommand.Parameters[10].Value = ShowType.Value;
			}
			else
			{
				sqlCommand.Parameters[10].Value = System.DBNull.Value;
			}
			sqlCommand.Parameters[11].Value = UpdateTime;
			sqlCommand.Parameters[12].Value = ZoneID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
